import Request from "@/util/request.js";

const apiRequest = new Request();
// 获取sourcetree
export const getSourceTreeApi = async () => {
    return await apiRequest.post("/api/system.source/tree", {});
}

// 创建source
export const addSourceApi = async (data) => {
    return await apiRequest.post("/api/system.source/create", data);
}

// 更新source
export const updateSourceApi = async (data) => {
    return await apiRequest.post("/api/system.source/save", data);
}

// 删除source
export const deleteSourceApi = async (data) => {
    return await apiRequest.post("/api/system.source/delete", data);
}

// 下架source
export const offlineSourceApi = async (data) => {
    return await apiRequest.post("/api/system.source/offline", data);
}